package com.hkts.naturalgas.index.controller;

import com.hkts.naturalgas.index.entity.ParamVo;
import com.hkts.naturalgas.index.service.serviceimpl.IndexServiceImpl;
import com.hkts.naturalgas.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/performance/index")
@Controller
@Slf4j
public class IndexController {
    @Autowired
    private IndexServiceImpl indexService;

    @RequestMapping(value = "/countIndex", method = RequestMethod.POST)
    @ResponseBody
    public Result<Object> countIndex(ParamVo param){
        return indexService.countIndex( param);
    }
    @RequestMapping(value = "/countIndexHead", method = RequestMethod.POST)
    @ResponseBody
    public Result<Object> countIndexHead(ParamVo param){
        return indexService.countIndexHead( param);
    }
    @RequestMapping(value = "/countIndexCentre", method = RequestMethod.POST)
    @ResponseBody
    public Result<Object> countIndexCentre(ParamVo param ){
        return indexService.countIndexCentre(param);
    }
    @RequestMapping(value = "/countIndexBottomAvg", method = RequestMethod.POST)
    @ResponseBody
    public Result<Object> countIndexBottomAvg(ParamVo param ){
        return indexService.countIndexBottomAvg(param);
    }
    @RequestMapping(value = "/countIndexBottomTimeOrder", method = RequestMethod.POST)
    @ResponseBody
    public Result<Object> countIndexBottomTimeOrder(ParamVo param ){
        return indexService.countIndexBottomTimeOrder(param);
    }
    @RequestMapping(value = "/countIndexBottomTime", method = RequestMethod.POST)
    @ResponseBody
    public Result<Object> countIndexBottomTime(ParamVo param ){
        return indexService.countIndexBottomTime(param);
    }

}
